package android.demo.intent;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.demo.R;
import android.os.Bundle;
import android.widget.TextView;

public class MyActivity extends Activity {

	private TextView tvIntent;
	
	
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.intent_my);
		Intent intent = getIntent();
		ComponentName cn = intent.getComponent();
		String packageName = cn.getPackageName();
		String className = cn.getClassName();
		
		String action = intent.getAction();
		
		tvIntent = (TextView) findViewById(R.id.tvIndent);
		tvIntent.setText("msg" + packageName + "\n" + "msg" + className);
		tvIntent.setText(action);
	}
}
